import service from "@/utils/http";
// 获取友链
export const getFriendLinks = () => {
    return service({
        url:"/link",
        method:"GET"
    })
}

/**
 * @name deleteLink
 * @description 删除对应的友链
 * @params {string[] | number[] | number | string} linkIds - 友链id数组
 * */

export let deleteLink = async (linkIds:number | string | string[] | number[]) => {
    return await service({
        method:"DELETE",
        url:"/link",
        data:{
            linkIds
        }
    })
}

/* 添加友链 */
export const addLInk = async (data:any) => {
    return await service({
        method:"POST",
        url:"/link",
        data:{
            ...data
        }
    })
}


/* 获取分组 */
export const queryGroup = async () =>　{
    return await service({
        url:"/group",
        method:"GET"
    })
}
